﻿using Global;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using ProdService;
using System.Diagnostics;
using UI.Filters;
using ViewModels.User;

namespace UI.Controllers
{
    public class CareerController : BaseController
    {
        private CareerService careerService;
        public CareerController(CareerService careerService)
        {
            this.careerService = careerService;
        }

        [TypeFilter(typeof(NeedLogon), Arguments = new object[] { Role.Contact })]
        public IActionResult Offer()
        {
            return View();
        }

        //[TypeFilter(typeof(NeedLogon))]
        public IActionResult NeedHelp()
        {
            return View();
        }

        //[TypeFilter(typeof(NeedLogon))]
        public IActionResult NeedHelpList()
        {
            return View(careerService.GetList());
        }

        public bool HasUsed() 
        {
            return true;
        }
    }
}